<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Jobs\UpdateUserBalance;
use App\Models\User;

class UserController extends Controller
{
    public function index()
    {
        $user = User::where('id', 1)->first();
        UpdateUserBalance::dispatch($user, 100)
            ->onQueue('balance_updates'); // 可选：指定专用队列
    }
}
